import { lazy } from 'react';
import { utils } from '@ohif/core';

const QualityControl = utils.asyncComponent(lazy(() => import('./QualityControl')));
const VisitView = utils.asyncComponent(lazy(() => import('./VisitView')));
const ArbitrateView = utils.asyncComponent(lazy(() => import('./ArbitrateView')));

import init from './init';

export default {
  id: 'measurements-panel',
  version: window.version,

  preRegistration({ servicesManager, commandsManager, configuration = {} }) {
    init({ servicesManager, commandsManager, configuration });
  },

  getPanelModule() {
    return {
      components: [{
        id: 'quality-control',
        label: 'Quality Control',
        component: QualityControl,
        width: 500,
        height: 152,
      },{
        id: 'visit-view',
        label: 'Visit View',
        component: VisitView,
        width: 500,
        height: 152,
      },{
        id: 'arbitrate-view',
        label: 'Arbitrate View',
        component: ArbitrateView,
        width: 500,
        height: 152,
      }],
      defaultContext: ['VIEWER'],
    };
  },
};
